package com.eclub.emotion.rootstone.protocol.util;


import java.io.Serializable;

import com.eclub.emotion.rootstone.serializer.annotation.RsMember;
import com.eclub.emotion.rootstone.serializer.annotation.RsSerializable;
import com.eclub.emotion.rootstone.server.entity.Out;

@RsSerializable(name="RpParameter")
public class KeyValuePair implements Serializable {

	private static final long serialVersionUID = 769684185117593589L;

	@RsMember(name="name")
    private String key;

    @RsMember
    private Object value;
    

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value instanceof Out ? ((Out<?>)value).getOutPara() : value;
    }

    public KeyValuePair() {
    }

    public KeyValuePair(String key, Object value) {
        this.setKey(key);
        this.setValue(value);
    }
}